<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
	font-family: 돋움;
	font-size: 12pt
}

td {
	font-family: 돋움;
	font-size: 10pt;
	min-height: 20px;
	height: 40px;
}

th {
	background-color: #666362;
}

.alignCenter {
	text-align: right;
}
</style>
<script type="text/javascript">
	function updateboard() {
		window.location.href = "/annotation_maven_spring/writeBoardRedirect.do";
	}
</script>
<title>Insert title here</title>
</head>
<body>
	<table width=50% align=center>
		<tr>
			<td align="center">
				<h1>자유 게시판</h1>
			</td>
		</tr>
		<tr>
			<td align="right"><input type="button" value="등록"
				onclick="updateboard()"></td>
		</tr>
	</table>
	<table border=1 width=50% height=20 align=center>
		<tr class="first">
			<th width=50 align=center>번호</th>
			<th width=430 align=center>제목</th>
			<th width=120 align=center>작성자</th>
			<th width=140 align=center>작성일</th>
		</tr>
		<c:if test="${fn:length(requestScope.board) > 0}">
			<c:forEach var="i" items="${requestScope.board}">
				<tr>
					<td align="center"><c:out value="${i.serial}" /></td>
					<td align="center"><a
						href="/annotation_maven_spring/searchBoardContent.do?index=${i.serial}"><c:out
								value="${i.subject}" /> </a></td>
					<td align="center"><c:out value="${i.writer}" /></td>
					<td align="center"><c:out value="${i.writtenDate}" /></td>
				</tr>
			</c:forEach>
		</c:if>
	</table>
</body>
</html>